﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

using Effects.Wave;

namespace Effects.Testing
{

    public class ShowWavePanel:Panel
    {
        
        private ShowWave show;
        private HScrollBar scrollBar;

        public Wave.Wave Wav
        {
            get { return show.Wav; }
            set { show.Wav = value; }
        }

        public ShowWave Show
        {
            get { return show; }
        }

        public ShowWavePanel(Wave.Wave wav)
        {
            show = new ShowWave(wav);
            scrollBar = new HScrollBar();

            show.ScrollBar = scrollBar;

            InitializeComponents();
        }

        private void InitializeComponents()
        {
            show.Location = new System.Drawing.Point(0, 0);
            show.Size = new System.Drawing.Size(this.Width, 200);
            Controls.Add(show);

            scrollBar.Location = new System.Drawing.Point(0, 200);
            scrollBar.Size = new System.Drawing.Size(this.Width, 50);
            Controls.Add(scrollBar);
        }

        protected override void OnResize(EventArgs eventargs)
        {
            this.Height = 250;
            show.Width = this.Width;
            scrollBar.Width = this.Width;
        }

    }
}
